import Vue from 'vue'
import VueI18n from 'vue-i18n'

Vue.use(VueI18n)
// 引入elementUi字典
import enLocale from 'element-ui/lib/locale/lang/en'
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'

// 引入语言包
import customerEN from './en'
import customerZH from './zh'

export default new VueI18n({
  locale: localStorage.getItem('language') || 'zh',
  messages: {
    zh: {
      sayhi: '早安，管理员，祝你开心每一天！',
      ...zhLocale,
      ...customerZH
    },
    en: {
      sayhi: 'Good morning, administrator, wish you happy every day!！',
      ...enLocale,
      ...customerEN
    }
  }
})
